package day13;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class h1 {
    public static void main(String[] args) throws IOException {
        File file=new File("note.txt");
        Scanner scanner = new Scanner(System.in);
        FileOutputStream fos=new FileOutputStream(file);
        String s = "";
        String str=scanner.next();
        while (!"exit".equals(str)){
            s=s+str;
            str=scanner.next();
        }
        byte[] bytes=s.getBytes(StandardCharsets.UTF_8);
        fos.write(bytes);
        fos.close();
    }
}